# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=gr-gsm
pkgver=1194.a77cf59
pkgrel=5
pkgdesc='Gnuradio blocks and tools for receiving GSM transmissions.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-radio')
url='https://github.com/ptrkrysik/gr-gsm'
license=('GPL3')
depends=('gnuradio' 'libosmocore' 'boost' 'swig' 'log4cpp' 'python-scipy'
         'qwt' 'gnuradio-companion' 'python-docutils' 'talloc' 'pygtk'
         'gnuradio-osmosdr' 'libosmosdr' 'cppunit' 'doxygen' 'lksctp-tools'
         'python-pyqt5' 'gcc-libs' 'python')
makedepends=('git' 'cmake' 'graphviz' 'python-yaml' 'pybind11' 'swig' 'log4cpp')
#source=("git+https://github.com/velichkov/$pkgname.git")
source=("git+https://github.com/bkerler/gr-gsm.git#branch=maint-3.10")
# temporary, move to master later, as it will support gnuradio 3.8 version
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  mkdir -p build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr ..

  make
}

package() {
  cd "$pkgname/build"

  make DESTDIR="$pkgdir" install
}

